
// dbDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "db_api.h"

#define WM_DB_CALLBACK	WM_USER + 0x100


// CdbDlg dialog
class CdbDlg : public CDialogEx
{
// Construction
public:
	CdbDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_DB_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	void ShowAudioRecords(AUDIORECORD records[20], int nTotal);
	void ShowVideoRecords(VIDEORECORD records[20], int nTotal);
	void ShowEBookRecords(EBOOKRECORD records[20], int nTotal);
	void ShowFolderRecords(FOLDERRECORD records[20], int nTotal);
	void ShowTagRecord(TAGRECORD records, int nTotal);
	void ShowUtf8Name(RECUTF8NAME items[20], int nTotal);
	void ShowID3Item(RECID3ITEM items[20], int nTotal);
	CString Utf8ToWideChar(char * txt);
	CString WideCharToUtf8(CString str);
	
// Implementation
protected:
	HICON m_hIcon;
	CString m_InputString;
	int m_InputOffset;

	// Generated message map functions
	virtual void OnOK();
	virtual void OnCancel();
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg LRESULT OnDBCallback(WPARAM, LPARAM);
	afx_msg void OnBnClickedButton1();
	afx_msg void OnBnClickedRadio00();
	afx_msg void OnBnClickedRadio01();
	afx_msg void OnBnClickedRadio10();
	afx_msg void OnBnClickedRadio11();
};
